package info.pixstone.foodhunter.domain.entity;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

import info.pixstone.foodhunter.acquaintance.IADishes;
@PersistenceCapable
public class EDishes implements IADishes
{
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)	
	private Key key;
	
	 @Persistent
	private int DID;
	 
	 @Persistent
	private int RID;
	 
	 @Persistent
	private String DName;
	 
	 @Persistent
	private int DType;
	 
	 @Persistent
	private double Dprice;
	 
	 @Persistent
	private String PID;
	 
	 @Persistent
	private double DVersion;
	public Key getKey() {
		// TODO Auto-generated method stub
		return key;
	}
	@Override
	public void setDishID(int did) {
		// TODO Auto-generated method stub
		this.DID=did;
	}

	@Override
	public void setResID(int rid) {
		// TODO Auto-generated method stub
		this.RID=rid;
	}

	@Override
	public void setDishName(String name) {
		// TODO Auto-generated method stub
		this.DName=name;
	}

	@Override
	public void setDishType(int type) {
		// TODO Auto-generated method stub
		this.DType=type;
	}

	@Override
	public void setDishPrice(double price) {
		// TODO Auto-generated method stub
		this.Dprice=price;
	}

	@Override
	public void setPhotoID(String pid) {
		// TODO Auto-generated method stub
		this.PID=pid;
	}

	//Constructor
	public  EDishes() {}
	
	public EDishes(int dID, int rID, String dName, int dType, double dprice,
			String pID, double dVersion) {
		super();
		DID = dID;
		RID = rID;
		DName = dName;
		DType = dType;
		Dprice = dprice;
		PID = pID;
		DVersion = dVersion;
	}
	@Override
	public void setDVersion(double version) {
		// TODO Auto-generated method stub
		this.DVersion=version;
	}

	@Override
	public int getDishID() {
		// TODO Auto-generated method stub
		return this.DID;
	}

	@Override
	public int getResID() {
		// TODO Auto-generated method stub
		return this.RID;
	}

	@Override
	public String getDishName() {
		// TODO Auto-generated method stub
		return this.DName;
	}

	@Override
	public int getDishType() {
		// TODO Auto-generated method stub
		return this.DType;
	}

	@Override
	public double getDishPrice() {
		// TODO Auto-generated method stub
		return this.Dprice;
	}

	@Override
	public String getPhotoID() {
		// TODO Auto-generated method stub
		return this.PID;
	}

	@Override
	public double getDVersion() {
		// TODO Auto-generated method stub
		return this.DVersion;
	}

}
